﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.ComponentModel;
using System.Diagnostics;
using System.Xml.Serialization;
using System.Windows.Forms;

using FCNS.Utility;
using FCNS.KeepMoney.Util;
using FCNS.KeepMoneyLibrary;

namespace FCNS.KeepMoney.Configuration
{
    /// <summary>
    /// 账务记录配置类
    /// </summary>
    public sealed class AceMoney
    {
        public AceMoney()
        {
        }

        decimal cappedAmount = 0;
        /// <summary>
        /// 每月支出的上线金额,0 为不限制
        /// </summary>
        public decimal CappedAmount
        {
            get { return cappedAmount; }
            set { cappedAmount = value; }
        }

        bool purseBalanceCanNotModify = true;
       [Obsolete("暂停使用")]
        public bool PurseBalanceCanNotModify
        {
            get
            {
                return purseBalanceCanNotModify;
            }
            set { purseBalanceCanNotModify = value; }
        }

        bool validationBalance = true;
        public bool ValidationBalance
        {
            get
            {
                return validationBalance;
            }
            set { validationBalance = value; }
        }

        /// <summary>
        /// 获取或设置利息百分比精度(最大8)
        /// </summary>
        public int Precision
        {
            get { return LibDefines.precision; }
            set { LibDefines.precision = value; }
        }

        /// <summary>
        /// 获取或设置显示的小数点位数(最大5)
        /// </summary>
        public int DecimalPlaces
        {
            get { return LibDefines.decimalDigits; }
            set { LibDefines.decimalDigits = value; }
        }

        /// <summary>
        /// 获取或设置是否在收入数值前添加+号
        /// </summary>
        public bool ShowPlus
        {
            get { return LibDefines.showPlus; }
            set { LibDefines.showPlus = value; }
        }

        /// <summary>
        /// 获取或设置是否在支出前添加-号
        /// </summary>
        public bool ShowMinus
        {
            get { return LibDefines.showMinus; }
            set { LibDefines.showMinus = value; }
        }

        int mColor = Color.Red.ToArgb();
        /// <summary>
        /// 获取或设置支出的颜色
        /// </summary>
        public int MinusColor
        {
            get { return mColor; }
            set { mColor = value; }
        }

        int pColor = Color.Blue.ToArgb();
        /// <summary>
        /// 获取或设置收入的颜色
        /// </summary>
        public int PlusColor
        {
            get { return pColor; }
            set { pColor = value; }
        }
    }
}
